package com.angel.architecture.services.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;

import com.angel.architecture.daos.LanguageDAO;
import com.angel.architecture.persistence.beans.Language;
import com.angel.architecture.services.LanguageService;

public class LanguageServiceImpl extends GenericServiceImpl implements LanguageService {

    @Autowired
    private LanguageDAO languageDAO;

    public Language findUniqueByName(String name) {
        return languageDAO.findUniqueByName(name);
    }

    public Language findUniqueByLocale(String locale) {
        return languageDAO.findUniqueByLocale(locale);
    }

    public Collection<Language> findAllActives(){
        return languageDAO.findAll("active", true);
    }

    public Collection<Language> findAllNonActives(){
        return languageDAO.findAll("active", false);
    }

    public LanguageDAO getLanguageDAO() {
        return languageDAO;
    }

    public void setLanguageDAO(LanguageDAO languageDAO) {
        this.languageDAO = languageDAO;
    }
}